package com.gisuni.sddc;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import org.nutz.mvc.NutConfig;
import org.nutz.mvc.Setup;

/**
 * 系统启动时执行的操作
 * 
 */
public class MainSetup implements Setup {

	@Override
	public int hashCode() {
		return super.hashCode();
	}

	@Override
	public void init(NutConfig nutConfig) { 
		try {
			ClassLoader loader = this.getClass().getClassLoader();
			String loghome = URLDecoder.decode(loader.getResource("../logs").getPath(), "utf-8");
			System.setProperty("logHome", loghome);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void destroy(NutConfig nutConfig) {
	}

}
